﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="Agenda.aspx.cs" Inherits=" RzCorportativo.Views.Consulta.Agenda" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="LeftContent" runat="server">
    <div>
        <div calendar="true">
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <%=EFramework.Web.Html.HtmlTags.CreateJavaScritpTag("AgendaJs.js", true)%>
    <h1>
        Agenda
    </h1>
    <table border="0" cellpadding="0" cellspacing="" style="width: 100%">
        <tr>
            <td class="field">
                Paciente:
            </td>
            <td class="field2">
                <asp:TextBox runat="server" ID="Nome" />
            </td>
            <td class="field">
                CPF:
            </td>
            <td class="field2">
                <asp:TextBox runat="server" ID="CPF" mask="cpf" />
            </td>
        </tr>
        <tr>
            <td class="field">
                Medico:
            </td>
            <td class="field2">
                <asp:TextBox runat="server" ID="NomeMedico" />
            </td>
            <td class="field">
                Especialidade:
            </td>
            <td class="field2">
                <asp:DropDownList runat="server" ID="Especialidade" Width="250">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="field">
                Data:
            </td>
            <td class="field2">
                <asp:TextBox runat="server" ID="Data" date="true" mask="calendar" />
            </td>
            <td class="field">
                Status:
            </td>
            <td class="field2">
                <asp:DropDownList runat="server" ID="Status" Width="250">
                    <asp:ListItem Text="Selecione" Value="0" Selected="True" />
                    <asp:ListItem Text="Aprovado" Value="1" />
                    <asp:ListItem Text="Não Aprovado" Value="2" />
                </asp:DropDownList>
            </td>
        </tr>
    </table>
    <br />
    <input type="button" name="novo" value="novo" class="btn btn-inverse" onclick="window.location='<%= EFramework.Web.UrlBase.UrlPadrao%>Views/Cadastros/Agendamento.aspx'" />
    <asp:Button Text="buscar" ID="buscar" runat="server" OnClick="buscar_Click" CssClass="btn" />
    <div style="min-width: 800px; margin-top: 30px;" class="grid">
        <asp:GridView runat="server" ID="ListaAgendamento" AutoGenerateColumns="false" AlternatingRowStyle-CssClass="gridrow_alternate"
            RowStyle-CssClass="gridrow" CssClass="table-hover" PageSize="5" AllowPaging="true"
            OnPageIndexChanging="ListaAgendamento_PageIndexChanging">
            <EmptyDataTemplate>
                <strong>Não foram encontrados médicos para os filtros selecionados</strong>
            </EmptyDataTemplate>
            <Columns>
                <asp:TemplateField Visible="false">
                    <ItemTemplate>
                        <asp:TextBox runat="server" ID="PacienteId" Text='<%# ((RzCorportativo.Lib.Agenda)Container.DataItem).PacienteId%>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="Medico.Pessoa.Nome" HeaderText="Medico" />
                <asp:BoundField DataField="Paciente.Nome" HeaderText="Paciente" />
                <asp:BoundField DataField="Especialidade.Descricao" HeaderText="Tipo de consulta" />
                <asp:BoundField DataField="DataConsulta" HeaderText="Data" DataFormatString="{0:dd/MM/yyyy HH:mm}" />
                <asp:TemplateField>
                    <ItemTemplate>
                        <%# this.CreateLink(Container.DataItem)%>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>
    <div id="__aprovar" style="display: none">
        <div alert-name='AgendaAlertaModal'>
        </div>
        <table border="0" cellpadding="1" cellspacing="1">
            <tr>
                <td>
                    Data:
                </td>
                <td>
                    <input type="text" name="dataInicio" id="dataInicio" value="" mask="calendar" disabled="disabled" />
                </td>
            </tr>
            <tr>
                <td>
                    Hora Inicio:
                </td>
                <td>
                    <input type="text" name="horaInicio" id="horaInicio" value="" clock="true" disabled="disabled" />
                </td>
            </tr>
            <tr>
                <td>
                    Hora Fim:
                </td>
                <td>
                    <input type="text" name="horaFim" id="horaFim" value="" clock="true" disabled="disabled" />
                </td>
            </tr>
        </table>
        <input type="hidden" name="AgendamentoId" id="AgendamentoId" />
    </div>
</asp:Content>
